package com.lnsf.bookstore.system.collect.service.impl;

import com.github.pagehelper.PageInfo;
import com.lnsf.bookstore.system.collect.dao.CollectMapper;
import com.lnsf.bookstore.system.collect.service.CollectService;
import com.lnsf.bookstore.system.collect.vo.Collect;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Map;

@Service
public class CollectServiceImpl implements CollectService{

    @Autowired
    private CollectMapper collectMapper;


    @Override
    public int save(Collect collect) {
        return collectMapper.insertSelective(collect);
    }

    @Override
    public Collect queryObject(Integer id) {
        return queryObject(id);
    }

    @Override
    public int deleteBatch(Integer[] ids) {
        return collectMapper.deleteBatch(ids);
    }

    @Override
    public int update(Collect collect) {
        return collectMapper.updateByPrimaryKeySelective(collect);
    }

    @Override
    public PageInfo<Collect> queryList(Map<String, Object> params) {
        return new PageInfo<Collect>(collectMapper.queryList(params));
    }
}
